package BasicMethod;
class MyClass {
    int x;

    // 以下是构造函数
    MyClass(int i) {
        x = i;
    }
    void Change(int i){
        x = i;
    }
    void print(){
        System.out.println(x);
    }
}

public class condemo {
    public static void main(String args[]) {
        MyClass t1 = new MyClass(10);
        MyClass t2 = new MyClass(12);
        System.out.println(t2.x);
        // t2.x = 20;
        // t2.Change(22);
        t2.print();
        System.out.println(t1.x + " " + t2.x);
    }
}
